import request from '@/utils/request'

// 查询医院列表
export function hospitalList(query) {
  return request({
    url: '/base/hospital/list',
    method: 'get',
    params: query
  })
}
// 新增医院
export function addHospital(data) {
  return request({
    url: '/base/hospital',
    method: 'post',
    data: data
  })
}


// 查询医院的科室列表
export function department(data) {
  return request({
    url: '/base/hospital/list-department',
    method: 'get',
    params: data
  })
}

// 获取医院详细信息
export function hospitalById(id) {
  return request({
    url: `/base/hospital/${id}`,
    method: 'get',
  })
}


// 修改医院
export function eitHhospital(data) {
  return request({
    url: '/base/hospital',
    method: 'put',
    data: data
  })
}

export function getCityTree(query) {
  return request({
    url: '/base/city/getCityTree',
    method: 'get',
    params: query
  })
}

export function getprovince() {
  return request({
    url: '/base/city/get-province',
    method: 'get'
  })
}

export function getcity(pid) {
  return request({
    url: '/base/city/get-city/' + pid,
    method: 'get'
  })
}
